<template>
  <div>
    <el-carousel height="200px">
      <el-carousel-item v-for="item in carouselList" :key="item">
        <el-image :src="item" :width="'100%'"></el-image>
      </el-carousel-item>
    </el-carousel>
    <el-tabs v-model="activeName" @tab-click="handleClick">
      <el-tab-pane label="用户管理" name="first">用户管理</el-tab-pane>
      <el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
      <el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
      <el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import {listCarousel} from "@/api/mhrb/platform/carousel";

export default {
  name: 'HtmlIndex',
  data() {
    return {
      carouselList: [],
      activeName: 'first'
    }
  },
  methods: {
    // 获取轮播图
    getListCarousel() {
      listCarousel().then(res => {
        this.carouselList = res.rows.map(e => process.env.VUE_APP_BASE_API + e.mapImage)
      })
    },
    // 获取案例分类
    getCases() {

    },
    // 获取案例列表
    getCasesList() {

    },
    handleClick(tab, event) {
      console.log(tab, event);
    }
  },
  created() {
    this.getListCarousel()
    this.getCases()
    this.getCasesList()
  }
};
</script>

<style>
/* 可以添加一些样式 */
.el-carousel__item h3 {
  color: #475669;
  font-size: 14px;
  opacity: 0.75;
  line-height: 200px;
  margin: 0;
  text-align: center;
}
</style>
